opencode-onboard 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/.agents/agents/back-engineer.md +7 -0
- package/content/.agents/agents/devops-manager.md +12 -4
- package/content/.agents/agents/front-engineer.md +7 -0
- package/content/.agents/agents/infra-engineer.md +7 -0
- package/content/.agents/agents/quality-engineer.md +7 -0
- package/content/.agents/agents/security-auditor.md +7 -0
- package/content/.agents/skills/browser-automation/SKILL.md +26 -10
- package/content/.agents/skills/ob-pullrequest-az/SKILL.md +170 -0
- package/content/.agents/skills/ob-pullrequest-gh/SKILL.md +140 -0
- package/content/.agents/skills/ob-userstory-az/SKILL.md +172 -206
- package/content/.agents/skills/ob-userstory-gh/SKILL.md +21 -57
- package/content/AGENTS.md +122 -13
- package/package.json +1 -1
|
@@ -72,3 +72,10 @@ Rules:
|
|
|
72
72
|
**Files changed:** <list>
|
|
73
73
|
**Blockers:** none | <description>
|
|
74
74
|
```
|
|
75
|
+
|
|
76
|
+
## Session Log
|
|
77
|
+
|
|
78
|
+
Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
|
|
79
|
+
- On start: `| {ISO timestamp} | back-engineer | started | {task summary} |`
|
|
80
|
+
- On skill load: `| {ISO timestamp} | back-engineer | skill-loaded | {skill-name} |`
|
|
81
|
+
- On done: `| {ISO timestamp} | back-engineer | completed | {files changed count} files |`
|
|
@@ -56,10 +56,11 @@ Rules:
|
|
|
56
56
|
1. Verify all changes are on a feature branch, never `main`
|
|
57
57
|
2. Load the matching pullrequest skill
|
|
58
58
|
3. Capture screenshots of local running app if UI changes exist
|
|
59
|
-
4.
|
|
60
|
-
5.
|
|
61
|
-
6.
|
|
62
|
-
7.
|
|
59
|
+
4. Read `.agents/session-log.md` if it exists — include a "Session Activity" section in the PR description with agent names, task counts, and total duration
|
|
60
|
+
5. Commit and push the feature branch
|
|
61
|
+
6. Create the PR following the skill instructions
|
|
62
|
+
7. Post PR comment with screenshots and change summary
|
|
63
|
+
8. Report PR URL to the lead
|
|
63
64
|
|
|
64
65
|
### Feedback Mode (PR review loop)
|
|
65
66
|
1. Load the matching pullrequest observer skill
|
|
@@ -106,3 +107,10 @@ Rules:
|
|
|
106
107
|
**Questions for human:** <count>, <list>
|
|
107
108
|
**Acknowledged only:** <count>
|
|
108
109
|
```
|
|
110
|
+
|
|
111
|
+
## Session Log
|
|
112
|
+
|
|
113
|
+
Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
|
|
114
|
+
- On start: `| {ISO timestamp} | devops-manager | started | {mode} mode |`
|
|
115
|
+
- On skill load: `| {ISO timestamp} | devops-manager | skill-loaded | {skill-name} |`
|
|
116
|
+
- On done: `| {ISO timestamp} | devops-manager | completed | {summary} |`
|
|
@@ -71,3 +71,10 @@ Rules:
|
|
|
71
71
|
**Files changed:** <list>
|
|
72
72
|
**Blockers:** none | <description>
|
|
73
73
|
```
|
|
74
|
+
|
|
75
|
+
## Session Log
|
|
76
|
+
|
|
77
|
+
Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
|
|
78
|
+
- On start: `| {ISO timestamp} | front-engineer | started | {task summary} |`
|
|
79
|
+
- On skill load: `| {ISO timestamp} | front-engineer | skill-loaded | {skill-name} |`
|
|
80
|
+
- On done: `| {ISO timestamp} | front-engineer | completed | {files changed count} files |`
|
|
@@ -72,3 +72,10 @@ Rules:
|
|
|
72
72
|
**Resources affected:** <list>
|
|
73
73
|
**Blockers:** none | <description>
|
|
74
74
|
```
|
|
75
|
+
|
|
76
|
+
## Session Log
|
|
77
|
+
|
|
78
|
+
Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
|
|
79
|
+
- On start: `| {ISO timestamp} | infra-engineer | started | {task summary} |`
|
|
80
|
+
- On skill load: `| {ISO timestamp} | infra-engineer | skill-loaded | {skill-name} |`
|
|
81
|
+
- On done: `| {ISO timestamp} | infra-engineer | completed | {files changed count} files |`
|
|
@@ -72,3 +72,10 @@ Rules:
|
|
|
72
72
|
**Acceptance criteria:** met | <unmet items>
|
|
73
73
|
**Blockers:** none | <description>
|
|
74
74
|
```
|
|
75
|
+
|
|
76
|
+
## Session Log
|
|
77
|
+
|
|
78
|
+
Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
|
|
79
|
+
- On start: `| {ISO timestamp} | quality-engineer | started | {task summary} |`
|
|
80
|
+
- On skill load: `| {ISO timestamp} | quality-engineer | skill-loaded | {skill-name} |`
|
|
81
|
+
- On done: `| {ISO timestamp} | quality-engineer | completed | {tests added count} tests |`
|
|
@@ -82,3 +82,10 @@ Rules:
|
|
|
82
82
|
|
|
83
83
|
**Blockers:** none | <critical findings that must be resolved before PR>
|
|
84
84
|
```
|
|
85
|
+
|
|
86
|
+
## Session Log
|
|
87
|
+
|
|
88
|
+
Append to `.agents/session-log.md` (create with header if missing, skip if `session-logging: disabled` in AGENTS.md):
|
|
89
|
+
- On start: `| {ISO timestamp} | security-auditor | started | {task summary} |`
|
|
90
|
+
- On skill load: `| {ISO timestamp} | security-auditor | skill-loaded | {skill-name} |`
|
|
91
|
+
- On done: `| {ISO timestamp} | security-auditor | completed | {findings count} findings |`
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser-automation
|
|
3
|
-
description: Reliable, composable browser automation using
|
|
3
|
+
description: Reliable, composable browser automation using OpenCode Browser primitives. Use when capturing screenshots of a locally running app, clicking UI elements, reading page content, or automating browser interactions on localhost.
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: opencode
|
|
5
|
+
compatibility: Requires opencode-browser extension installed and running.
|
|
6
6
|
metadata:
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "1.0"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Browser MCP tools are permitted ONLY for interactions with the LOCAL running app on `localhost` URLs.
|
|
12
|
+
**Navigating to external services (github.com, dev.azure.com, etc.) via browser MCP is FORBIDDEN.**
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
- Use `browser_query` list and index selection to click reliably
|
|
15
|
-
- Confirm state changes after each action
|
|
16
|
-
- Support CLI-first debugging with `opencode-browser tool` commands
|
|
14
|
+
---
|
|
17
15
|
|
|
18
16
|
## Best-practice workflow
|
|
19
17
|
|
|
@@ -25,6 +23,8 @@ metadata:
|
|
|
25
23
|
6. Click, type, or select using `index`
|
|
26
24
|
7. Confirm using `browser_query` or `browser_snapshot`
|
|
27
25
|
|
|
26
|
+
---
|
|
27
|
+
|
|
28
28
|
## CLI-first debugging
|
|
29
29
|
|
|
30
30
|
- List all available tools: `npx @different-ai/opencode-browser tools`
|
|
@@ -33,7 +33,7 @@ metadata:
|
|
|
33
33
|
- Run smoke test: `npx @different-ai/opencode-browser self-test`
|
|
34
34
|
- After `update`, reload the unpacked extension in `chrome://extensions`
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
---
|
|
37
37
|
|
|
38
38
|
## Selecting options
|
|
39
39
|
|
|
@@ -41,6 +41,8 @@ This path is useful for reproducing selector/scroll issues quickly before runnin
|
|
|
41
41
|
- Prefer `value` or `label`; use `optionIndex` when needed
|
|
42
42
|
- Example: `browser_select({ selector: "select", value: "plugin" })`
|
|
43
43
|
|
|
44
|
+
---
|
|
45
|
+
|
|
44
46
|
## Query modes
|
|
45
47
|
|
|
46
48
|
- `text`: read visible text from a matched element
|
|
@@ -49,11 +51,15 @@ This path is useful for reproducing selector/scroll issues quickly before runnin
|
|
|
49
51
|
- `exists`: check presence and count
|
|
50
52
|
- `page_text`: extract visible page text
|
|
51
53
|
|
|
54
|
+
---
|
|
55
|
+
|
|
52
56
|
## Opening tabs
|
|
53
57
|
|
|
54
58
|
- Use `browser_open_tab` to create a new tab, optionally with `url` and `active`
|
|
55
59
|
- Example: `browser_open_tab({ url: "https://example.com", active: false })`
|
|
56
60
|
|
|
61
|
+
---
|
|
62
|
+
|
|
57
63
|
## Troubleshooting
|
|
58
64
|
|
|
59
65
|
- If a selector fails, run `browser_query` with `mode=page_text` to confirm the content exists
|
|
@@ -61,3 +67,13 @@ This path is useful for reproducing selector/scroll issues quickly before runnin
|
|
|
61
67
|
- For inbox/chat panes, try text selectors first (`text:Subject line`) then verify selection with `browser_query`
|
|
62
68
|
- For scrollable containers, pass both `selector` and `x`/`y` to `browser_scroll` and then verify `scrollTop`
|
|
63
69
|
- Confirm results after each action
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Guardrails
|
|
74
|
+
|
|
75
|
+
- ✅ Screenshots of locally running app on `localhost` URLs
|
|
76
|
+
- ✅ Click, type, scroll, query on `localhost` pages
|
|
77
|
+
- ❌ Navigate to external services (github.com, dev.azure.com, npmjs.com, etc.) — FORBIDDEN
|
|
78
|
+
- ❌ Use browser tools for any DevOps or GitHub operations — FORBIDDEN
|
|
79
|
+
- ❌ Use browser tools to read or modify production systems — FORBIDDEN
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ob-pullrequest-az
|
|
3
|
+
description: Create Azure DevOps PRs with screenshots, or read and triage PR review feedback. Use when shipping a feature branch or when user says "I've added comments to the PR".
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires az CLI, az devops extension, openspec CLI, and opencode-browser for screenshots.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
**RTK - MANDATORY**
|
|
12
|
+
|
|
13
|
+
Use `rtk` wrapper for ALL CLI commands:
|
|
14
|
+
- `rtk git add` NOT `git add`
|
|
15
|
+
- `rtk git commit` NOT `git commit`
|
|
16
|
+
- `rtk git push` NOT `git push`
|
|
17
|
+
- `rtk az repos pr create` NOT `az repos pr create`
|
|
18
|
+
- `rtk az repos pr work-item add` NOT `az repos pr work-item add`
|
|
19
|
+
- `rtk az devops invoke` NOT `az devops invoke`
|
|
20
|
+
|
|
21
|
+
**Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
|
|
22
|
+
Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Mode A: Create PR (ship mode)
|
|
27
|
+
|
|
28
|
+
Triggered when devops-manager is in ship mode after implementation is complete.
|
|
29
|
+
|
|
30
|
+
### Step 1: Verify feature branch
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
rtk git branch --show-current
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
|
|
37
|
+
|
|
38
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
42
|
+
browser_wait ms=2000
|
|
43
|
+
browser_screenshot
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
47
|
+
|
|
48
|
+
### Step 3: Commit and push
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
rtk git add .
|
|
52
|
+
rtk git commit -m "feat(#{id}): {description}"
|
|
53
|
+
rtk git push origin feature/{id}-{slug}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 4: Create PR
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
rtk az repos pr create \
|
|
60
|
+
--repository {repo} \
|
|
61
|
+
--source-branch feature/{id}-{slug} \
|
|
62
|
+
--target-branch main \
|
|
63
|
+
--title "feat(#{id}): {title}" \
|
|
64
|
+
--description "{description}"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Step 5: Link work item (MANDATORY, run sequentially — not in parallel)
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
rtk az repos pr work-item add --id {pr-id} --work-items {workitem-id}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Step 6: Post screenshot comment
|
|
74
|
+
|
|
75
|
+
Build raw URL for each image:
|
|
76
|
+
```
|
|
77
|
+
https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Post via:
|
|
81
|
+
```bash
|
|
82
|
+
rtk az devops invoke \
|
|
83
|
+
--area git --resource pullRequestThreads \
|
|
84
|
+
--route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
|
|
85
|
+
--http-method POST --api-version 7.1 --in-file body.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`body.json`:
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"comments": [{
|
|
92
|
+
"parentCommentId": 0,
|
|
93
|
+
"content": "## Screenshots\n\n",
|
|
94
|
+
"commentType": 1
|
|
95
|
+
}],
|
|
96
|
+
"status": "active"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Mode B: Read PR Feedback (feedback mode)
|
|
103
|
+
|
|
104
|
+
Triggered when user says "I've added comments to the PR" or "check PR feedback".
|
|
105
|
+
|
|
106
|
+
### Step 1: Find PRs
|
|
107
|
+
|
|
108
|
+
If PR link provided, extract ID from URL. Otherwise:
|
|
109
|
+
```bash
|
|
110
|
+
rtk az repos pr list --repository {repo} --status active --top 1
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Step 2: Read comment threads
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
rtk az devops invoke \
|
|
117
|
+
--area git --resource pullRequestThreads \
|
|
118
|
+
--route-parameters project={project} repositoryId={repo} pullRequestId={id} \
|
|
119
|
+
--http-method GET --api-version 7.1
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Step 3: Categorize feedback
|
|
123
|
+
|
|
124
|
+
| Category | Description | Action |
|
|
125
|
+
|----------|-------------|--------|
|
|
126
|
+
| `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
|
|
127
|
+
| `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
|
|
128
|
+
| `question` | Reviewer asks a question | Reply with answer |
|
|
129
|
+
| `resolved` | Thread already resolved | Skip |
|
|
130
|
+
|
|
131
|
+
### Step 4: Update openspec (if spec-update)
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
rtk git branch --show-current
|
|
135
|
+
# feature/193208-roles-crud → change: us-193208-roles-crud
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
|
|
139
|
+
|
|
140
|
+
### Step 5: Reply to each thread
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
rtk az devops invoke \
|
|
144
|
+
--area git --resource pullRequestThreadComments \
|
|
145
|
+
--route-parameters project={project} repositoryId={repo} pullRequestId={id} threadId={tid} \
|
|
146
|
+
--http-method POST --api-version 7.1 --in-file reply.json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`reply.json`:
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"comments": [{
|
|
153
|
+
"parentCommentId": 1,
|
|
154
|
+
"content": "Acknowledged — applying this change now.",
|
|
155
|
+
"commentType": 1
|
|
156
|
+
}]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Guardrails
|
|
163
|
+
|
|
164
|
+
- ✅ Commit and push to feature branches only
|
|
165
|
+
- ✅ Create and comment on PRs via az CLI
|
|
166
|
+
- ✅ Screenshots of localhost only via browser_screenshot
|
|
167
|
+
- ❌ Commit or push to `main` — FORBIDDEN
|
|
168
|
+
- ❌ Force push — FORBIDDEN
|
|
169
|
+
- ❌ Merge or approve PRs — human-only
|
|
170
|
+
- ❌ Navigate browser to dev.azure.com — FORBIDDEN
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ob-pullrequest-gh
|
|
3
|
+
description: Create GitHub PRs with screenshots, or read and triage PR review feedback. Use when shipping a feature branch or when user says "I've added comments to the PR".
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires gh CLI, openspec CLI, and opencode-browser for screenshots.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
**RTK - MANDATORY**
|
|
12
|
+
|
|
13
|
+
Use `rtk` wrapper for ALL CLI commands:
|
|
14
|
+
- `rtk git add` NOT `git add`
|
|
15
|
+
- `rtk git commit` NOT `git commit`
|
|
16
|
+
- `rtk git push` NOT `git push`
|
|
17
|
+
- `rtk gh pr create` NOT `gh pr create`
|
|
18
|
+
- `rtk gh pr comment` NOT `gh pr comment`
|
|
19
|
+
- `rtk gh api` NOT `gh api`
|
|
20
|
+
|
|
21
|
+
**Browser MCP tools are FORBIDDEN for all GitHub operations.**
|
|
22
|
+
Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Mode A: Create PR (ship mode)
|
|
27
|
+
|
|
28
|
+
Triggered when devops-manager is in ship mode after implementation is complete.
|
|
29
|
+
|
|
30
|
+
### Step 1: Verify feature branch
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
rtk git branch --show-current
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
|
|
37
|
+
|
|
38
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
42
|
+
browser_wait ms=2000
|
|
43
|
+
browser_screenshot
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
47
|
+
|
|
48
|
+
### Step 3: Commit and push
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
rtk git add .
|
|
52
|
+
rtk git commit -m "feat(#{id}): {description}"
|
|
53
|
+
rtk git push origin feature/{slug}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 4: Create PR
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
rtk gh pr create \
|
|
60
|
+
--base main \
|
|
61
|
+
--head feature/{slug} \
|
|
62
|
+
--title "feat: {title}" \
|
|
63
|
+
--body "{description}"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Step 5: Post screenshot comment
|
|
67
|
+
|
|
68
|
+
Build raw URL for each image:
|
|
69
|
+
```
|
|
70
|
+
https://raw.githubusercontent.com/{owner}/{repo}/feature/{slug}/openspec/changes/{change}/images/{file}.png
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Post comment:
|
|
74
|
+
```bash
|
|
75
|
+
rtk gh pr comment {pr-number} --body $'## Screenshots\n\n'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Mode B: Read PR Feedback (feedback mode)
|
|
81
|
+
|
|
82
|
+
Triggered when user says "I've added comments to the PR" or "check PR feedback".
|
|
83
|
+
|
|
84
|
+
### Step 1: Find PRs
|
|
85
|
+
|
|
86
|
+
If PR link provided, extract number from URL. Otherwise:
|
|
87
|
+
```bash
|
|
88
|
+
rtk gh pr list --state open --limit 1
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 2: Read comment threads
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
rtk gh pr view {pr-number} --comments
|
|
95
|
+
# Or structured output:
|
|
96
|
+
rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
|
|
97
|
+
rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Step 3: Categorize feedback
|
|
101
|
+
|
|
102
|
+
| Category | Description | Action |
|
|
103
|
+
|----------|-------------|--------|
|
|
104
|
+
| `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
|
|
105
|
+
| `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
|
|
106
|
+
| `question` | Reviewer asks a question | Reply with answer |
|
|
107
|
+
| `resolved` | Thread already resolved | Skip |
|
|
108
|
+
|
|
109
|
+
### Step 4: Update openspec (if spec-update)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
rtk git branch --show-current
|
|
113
|
+
# feature/add-user-auth → change: add-user-auth
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
|
|
117
|
+
|
|
118
|
+
### Step 5: Reply to each comment thread
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Reply to a review comment
|
|
122
|
+
rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
|
|
123
|
+
--method POST \
|
|
124
|
+
--field body="Acknowledged — applying this change now."
|
|
125
|
+
|
|
126
|
+
# Or post a general PR comment
|
|
127
|
+
rtk gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Guardrails
|
|
133
|
+
|
|
134
|
+
- ✅ Commit and push to feature branches only
|
|
135
|
+
- ✅ Create and comment on PRs via gh CLI
|
|
136
|
+
- ✅ Screenshots of localhost only via browser_screenshot
|
|
137
|
+
- ❌ Commit or push to `main` — FORBIDDEN
|
|
138
|
+
- ❌ Force push — FORBIDDEN
|
|
139
|
+
- ❌ Merge or approve PRs — human-only
|
|
140
|
+
- ❌ Navigate browser to github.com — FORBIDDEN
|
|
@@ -1,206 +1,172 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ob-userstory-az
|
|
3
|
-
description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires openspec CLI and Azure CLI.
|
|
6
|
-
metadata:
|
|
7
|
-
author: copilots
|
|
8
|
-
version: "3.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
**RTK - MANDATORY**
|
|
12
|
-
|
|
13
|
-
Use `rtk` wrapper for ALL CLI commands:
|
|
14
|
-
- `rtk az boards work-item show` NOT `az boards work-item show`
|
|
15
|
-
- `rtk openspec new change` NOT `openspec new change`
|
|
16
|
-
|
|
17
|
-
**Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Azure CLI Setup (One-Time)
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
az config set extension.dynamic_install_allow_preview=true
|
|
25
|
-
az extension add --name azure-devops
|
|
26
|
-
az login
|
|
27
|
-
az devops login --organization https://dev.azure.com/
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**PAT Token**, go to `https://dev.azure.com/
|
|
31
|
-
Create with scopes: **Work Items (Read & Write)** + **Code (Read & Write)**
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Steps
|
|
36
|
-
|
|
37
|
-
1. **Extract Work Item ID** from URL
|
|
38
|
-
- `?workitem=193208` → ID: 193208
|
|
39
|
-
- `/workitems/edit/193208` → ID: 193208
|
|
40
|
-
|
|
41
|
-
2. **Fetch Work Item**
|
|
42
|
-
```bash
|
|
43
|
-
rtk az boards work-item show --id 193208
|
|
44
|
-
```
|
|
45
|
-
Do NOT use `--organization` flag (uses default org).
|
|
46
|
-
|
|
47
|
-
3. **Extract Key Fields** from JSON response:
|
|
48
|
-
- `fields.System.Title` → Title
|
|
49
|
-
- `fields.System.Description` → Description (may be HTML, strip tags)
|
|
50
|
-
- `fields.System.WorkItemType` → Type
|
|
51
|
-
- `fields.System.IterationPath` → Sprint
|
|
52
|
-
- `fields.System.State` → State
|
|
53
|
-
- `fields.System.AcceptanceCriteria` → AC (if present)
|
|
54
|
-
|
|
55
|
-
4. **Create OpenSpec Change**
|
|
56
|
-
```bash
|
|
57
|
-
rtk openspec new change "us-{id}-{slug}"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Full Azure DevOps CLI Reference
|
|
63
|
-
|
|
64
|
-
Use these for ALL DevOps operations, browser MCP is FORBIDDEN.
|
|
65
|
-
|
|
66
|
-
### Work Items
|
|
67
|
-
```bash
|
|
68
|
-
# Read work item
|
|
69
|
-
rtk az boards work-item show --id <id>
|
|
70
|
-
|
|
71
|
-
# Update work item state
|
|
72
|
-
rtk az boards work-item update --id <id> --state "Active"
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
###
|
|
76
|
-
```bash
|
|
77
|
-
#
|
|
78
|
-
rtk az
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
#
|
|
84
|
-
rtk az
|
|
85
|
-
--
|
|
86
|
-
--
|
|
87
|
-
--
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
https://dev.azure.com/{org}/{project}/_sprints/backlog/{team}/{project}/Sprint%20110?workitem=193208
|
|
174
|
-
|
|
175
|
-
# Direct work item
|
|
176
|
-
https://dev.azure.com/{org}/{project}/_workitems/edit/193208
|
|
177
|
-
|
|
178
|
-
# PR
|
|
179
|
-
https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{pr-id}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## Output Format
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
## User Story Parsed
|
|
188
|
-
|
|
189
|
-
**Work Item:** #193208
|
|
190
|
-
**Title:** Roles CRUD
|
|
191
|
-
**Type:** User Story
|
|
192
|
-
**Iteration:** Sprint 110
|
|
193
|
-
**State:** New
|
|
194
|
-
|
|
195
|
-
**Change Created:** us-193208-roles-crud
|
|
196
|
-
|
|
197
|
-
### Next Steps
|
|
198
|
-
1. Review the proposal
|
|
199
|
-
2. Say "implement the plan" to start implementation
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
## Constraints
|
|
203
|
-
|
|
204
|
-
- This skill only PARSES and PROPOSES, implementation via openspec-apply-change
|
|
205
|
-
- Always use `rtk` for CLI commands
|
|
206
|
-
- Browser MCP tools FORBIDDEN for all DevOps operations
|
|
1
|
+
---
|
|
2
|
+
name: ob-userstory-az
|
|
3
|
+
description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI and Azure CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "3.1"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
**RTK - MANDATORY**
|
|
12
|
+
|
|
13
|
+
Use `rtk` wrapper for ALL CLI commands:
|
|
14
|
+
- `rtk az boards work-item show` NOT `az boards work-item show`
|
|
15
|
+
- `rtk openspec new change` NOT `openspec new change`
|
|
16
|
+
|
|
17
|
+
**Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Azure CLI Setup (One-Time)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
az config set extension.dynamic_install_allow_preview=true
|
|
25
|
+
az extension add --name azure-devops
|
|
26
|
+
az login
|
|
27
|
+
az devops login --organization https://dev.azure.com/{org}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**PAT Token**, go to `https://dev.azure.com/{org}/_usersSettings/tokens`
|
|
31
|
+
Create with scopes: **Work Items (Read & Write)** + **Code (Read & Write)**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
1. **Extract Work Item ID** from URL
|
|
38
|
+
- `?workitem=193208` → ID: 193208
|
|
39
|
+
- `/workitems/edit/193208` → ID: 193208
|
|
40
|
+
|
|
41
|
+
2. **Fetch Work Item**
|
|
42
|
+
```bash
|
|
43
|
+
rtk az boards work-item show --id 193208
|
|
44
|
+
```
|
|
45
|
+
Do NOT use `--organization` flag (uses default org).
|
|
46
|
+
|
|
47
|
+
3. **Extract Key Fields** from JSON response:
|
|
48
|
+
- `fields.System.Title` → Title
|
|
49
|
+
- `fields.System.Description` → Description (may be HTML, strip tags)
|
|
50
|
+
- `fields.System.WorkItemType` → Type
|
|
51
|
+
- `fields.System.IterationPath` → Sprint
|
|
52
|
+
- `fields.System.State` → State
|
|
53
|
+
- `fields.System.AcceptanceCriteria` → AC (if present)
|
|
54
|
+
|
|
55
|
+
4. **Create OpenSpec Change**
|
|
56
|
+
```bash
|
|
57
|
+
rtk openspec new change "us-{id}-{slug}"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Full Azure DevOps CLI Reference
|
|
63
|
+
|
|
64
|
+
Use these for ALL DevOps operations, browser MCP is FORBIDDEN.
|
|
65
|
+
|
|
66
|
+
### Work Items
|
|
67
|
+
```bash
|
|
68
|
+
# Read work item
|
|
69
|
+
rtk az boards work-item show --id <id>
|
|
70
|
+
|
|
71
|
+
# Update work item state
|
|
72
|
+
rtk az boards work-item update --id <id> --state "Active"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### PR Threads (Comments)
|
|
76
|
+
```bash
|
|
77
|
+
# Read all threads
|
|
78
|
+
rtk az devops invoke \
|
|
79
|
+
--area git --resource pullRequestThreads \
|
|
80
|
+
--route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
|
|
81
|
+
--http-method GET --api-version 7.1
|
|
82
|
+
|
|
83
|
+
# Post new comment thread (requires body.json)
|
|
84
|
+
rtk az devops invoke \
|
|
85
|
+
--area git --resource pullRequestThreads \
|
|
86
|
+
--route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
|
|
87
|
+
--http-method POST --api-version 7.1 --in-file body.json
|
|
88
|
+
|
|
89
|
+
# Reply to existing thread
|
|
90
|
+
rtk az devops invoke \
|
|
91
|
+
--area git --resource pullRequestThreadComments \
|
|
92
|
+
--route-parameters project={project} repositoryId=<repo> pullRequestId=<id> threadId=<tid> \
|
|
93
|
+
--http-method POST --api-version 7.1 --in-file reply.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Comment Body JSON format
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"comments": [
|
|
100
|
+
{
|
|
101
|
+
"parentCommentId": 0,
|
|
102
|
+
"content": "Your markdown comment here.",
|
|
103
|
+
"commentType": 1
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"status": "active"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
For replies, `parentCommentId` should be the ID of the first comment in the thread (usually 1).
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Screenshot / Image Strategy
|
|
115
|
+
|
|
116
|
+
**Never upload images as PR attachments.** Save to openspec change folder and reference via raw URL.
|
|
117
|
+
|
|
118
|
+
### Save location
|
|
119
|
+
```
|
|
120
|
+
openspec/changes/{change-name}/images/{screenshot}.png
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Raw URL format (renders inline in PR comments)
|
|
124
|
+
```
|
|
125
|
+
https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Do NOT use `_git/` URLs, they return HTML, not raw binary.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## URL Formats Reference
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
# Sprint board with work item
|
|
136
|
+
https://dev.azure.com/{org}/{project}/_sprints/backlog/{team}/{project}/Sprint%20110?workitem=193208
|
|
137
|
+
|
|
138
|
+
# Direct work item
|
|
139
|
+
https://dev.azure.com/{org}/{project}/_workitems/edit/193208
|
|
140
|
+
|
|
141
|
+
# PR
|
|
142
|
+
https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{pr-id}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Output Format
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
## User Story Parsed
|
|
151
|
+
|
|
152
|
+
**Work Item:** #{id}
|
|
153
|
+
**Title:** {title}
|
|
154
|
+
**Type:** User Story
|
|
155
|
+
**Iteration:** {sprint}
|
|
156
|
+
**State:** {state}
|
|
157
|
+
|
|
158
|
+
**Change Created:** us-{id}-{slug}
|
|
159
|
+
|
|
160
|
+
### Next Steps
|
|
161
|
+
1. Review the proposal
|
|
162
|
+
2. Say "implement the plan" to start implementation
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Guardrails
|
|
168
|
+
|
|
169
|
+
- ✅ Parse Azure DevOps URL and create OpenSpec change
|
|
170
|
+
- ✅ Use `rtk` for all Azure CLI operations
|
|
171
|
+
- ❌ Browser MCP tools for Azure DevOps operations — FORBIDDEN
|
|
172
|
+
- ❌ Implementation — this skill only parses and proposes
|
|
@@ -5,9 +5,17 @@ license: MIT
|
|
|
5
5
|
compatibility: Requires openspec CLI and gh CLI.
|
|
6
6
|
metadata:
|
|
7
7
|
author: copilots
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.1"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
**RTK - MANDATORY**
|
|
12
|
+
|
|
13
|
+
Use `rtk` wrapper for ALL CLI commands:
|
|
14
|
+
- `rtk gh issue view` NOT `gh issue view`
|
|
15
|
+
- `rtk gh issue list` NOT `gh issue list`
|
|
16
|
+
- `rtk gh issue edit` NOT `gh issue edit`
|
|
17
|
+
- `rtk openspec new change` NOT `openspec new change`
|
|
18
|
+
|
|
11
19
|
**Browser MCP tools are FORBIDDEN for all GitHub operations.**
|
|
12
20
|
|
|
13
21
|
---
|
|
@@ -33,7 +41,7 @@ gh auth status
|
|
|
33
41
|
|
|
34
42
|
2. **Fetch Issue**
|
|
35
43
|
```bash
|
|
36
|
-
gh issue view 42 --json number,title,body,labels,milestone,state
|
|
44
|
+
rtk gh issue view 42 --json number,title,body,labels,milestone,state
|
|
37
45
|
```
|
|
38
46
|
|
|
39
47
|
3. **Extract Key Fields** from JSON response:
|
|
@@ -46,7 +54,7 @@ gh auth status
|
|
|
46
54
|
|
|
47
55
|
4. **Create OpenSpec Change**
|
|
48
56
|
```bash
|
|
49
|
-
openspec new change "gh-{number}-{slug}"
|
|
57
|
+
rtk openspec new change "gh-{number}-{slug}"
|
|
50
58
|
```
|
|
51
59
|
|
|
52
60
|
---
|
|
@@ -58,55 +66,13 @@ Use these for ALL GitHub operations, browser MCP is FORBIDDEN.
|
|
|
58
66
|
### Issues
|
|
59
67
|
```bash
|
|
60
68
|
# Read issue
|
|
61
|
-
gh issue view <number>
|
|
69
|
+
rtk gh issue view <number>
|
|
62
70
|
|
|
63
71
|
# List open issues
|
|
64
|
-
gh issue list --state open --limit 10
|
|
72
|
+
rtk gh issue list --state open --limit 10
|
|
65
73
|
|
|
66
74
|
# Update issue
|
|
67
|
-
gh issue edit <number> --add-label "in-progress"
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Pull Requests
|
|
71
|
-
```bash
|
|
72
|
-
# List open PRs
|
|
73
|
-
gh pr list --state open
|
|
74
|
-
|
|
75
|
-
# Show PR details
|
|
76
|
-
gh pr view <number>
|
|
77
|
-
|
|
78
|
-
# Create PR
|
|
79
|
-
gh pr create \
|
|
80
|
-
--base main \
|
|
81
|
-
--head feature/{slug} \
|
|
82
|
-
--title "feat: <title>" \
|
|
83
|
-
--body "<description>"
|
|
84
|
-
|
|
85
|
-
# Update PR
|
|
86
|
-
gh pr edit <number> --body "<text>"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### PR Comments
|
|
90
|
-
```bash
|
|
91
|
-
# Read PR comments
|
|
92
|
-
gh pr view <number> --comments
|
|
93
|
-
|
|
94
|
-
# Post PR comment
|
|
95
|
-
gh pr comment <number> --body "Your markdown comment here."
|
|
96
|
-
|
|
97
|
-
# Reply to review comment via API
|
|
98
|
-
gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
|
|
99
|
-
--method POST \
|
|
100
|
-
--field body="Reply text here."
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Review Comments (structured)
|
|
104
|
-
```bash
|
|
105
|
-
# Get all review comments on a PR
|
|
106
|
-
gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
|
|
107
|
-
|
|
108
|
-
# Get all reviews
|
|
109
|
-
gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
|
|
75
|
+
rtk gh issue edit <number> --add-label "in-progress"
|
|
110
76
|
```
|
|
111
77
|
|
|
112
78
|
---
|
|
@@ -125,11 +91,6 @@ openspec/changes/{change-name}/images/{screenshot}.png
|
|
|
125
91
|
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/openspec/changes/{change}/images/{file}.png
|
|
126
92
|
```
|
|
127
93
|
|
|
128
|
-
### PR comment with screenshot
|
|
129
|
-
```bash
|
|
130
|
-
gh pr comment <number> --body "## Screenshots\n\n"
|
|
131
|
-
```
|
|
132
|
-
|
|
133
94
|
---
|
|
134
95
|
|
|
135
96
|
## URL Formats Reference
|
|
@@ -164,8 +125,11 @@ https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}
|
|
|
164
125
|
2. Say "implement the plan" to start implementation
|
|
165
126
|
```
|
|
166
127
|
|
|
167
|
-
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Guardrails
|
|
168
131
|
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
- Browser MCP tools
|
|
132
|
+
- ✅ Parse GitHub Issue URL and create OpenSpec change
|
|
133
|
+
- ✅ Use `rtk gh` for all GitHub CLI operations
|
|
134
|
+
- ❌ Browser MCP tools for GitHub operations — FORBIDDEN
|
|
135
|
+
- ❌ Implementation — this skill only parses and proposes
|
package/content/AGENTS.md
CHANGED
|
@@ -65,6 +65,72 @@ Replace the entire contents of this file (`AGENTS.md`) with everything below the
|
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
+
### Step 4b, Patch opsx-apply for ensemble
|
|
69
|
+
|
|
70
|
+
Read `.opencode/commands/opsx-apply.md`. Find the step that instructs the agent to **implement tasks directly** — it will contain phrases like "make the code changes", "implement tasks", "loop until done or blocked". This step tells the agent to write code itself.
|
|
71
|
+
|
|
72
|
+
**Replace that step and everything after it** (completion output, pause output, guardrails, fluid workflow) with the following:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
6. **Implement via ensemble team**
|
|
76
|
+
|
|
77
|
+
NEVER implement tasks directly. Always delegate to specialists via ensemble.
|
|
78
|
+
|
|
79
|
+
a. Create feature branch if not already on one: `feature/{id}-{slug}`
|
|
80
|
+
b. Create team:
|
|
81
|
+
```
|
|
82
|
+
team_create "<change-name>"
|
|
83
|
+
```
|
|
84
|
+
Announce: "Team running. Monitor at http://localhost:4747/"
|
|
85
|
+
|
|
86
|
+
c. Spawn only what the tasks require (in parallel):
|
|
87
|
+
```
|
|
88
|
+
team_spawn name:front agent:front-engineer → UI/frontend tasks
|
|
89
|
+
team_spawn name:back agent:back-engineer → backend/API tasks
|
|
90
|
+
team_spawn name:infra agent:infra-engineer → infra/pipeline tasks
|
|
91
|
+
```
|
|
92
|
+
Pass each specialist: their relevant tasks + all context file paths from step above.
|
|
93
|
+
Log each spawn to `.agents/session-log.md` (see Session Log section).
|
|
94
|
+
|
|
95
|
+
d. Wait for all → `team_results` → `team_shutdown` + `team_merge`
|
|
96
|
+
|
|
97
|
+
7. **Quality check**
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
team_spawn name:quality agent:quality-engineer
|
|
101
|
+
```
|
|
102
|
+
Wait → `team_results` → fix blockers → `team_shutdown`
|
|
103
|
+
|
|
104
|
+
8. **Mark tasks complete in openspec**
|
|
105
|
+
|
|
106
|
+
After specialists finish, update the tasks file: `- [ ]` → `- [x]` for each completed task.
|
|
107
|
+
Run `openspec status --change "<name>" --json` to confirm progress.
|
|
108
|
+
|
|
109
|
+
9. **On completion or pause, show status**
|
|
110
|
+
|
|
111
|
+
Display:
|
|
112
|
+
- Tasks completed this session
|
|
113
|
+
- Overall progress: "N/M tasks complete"
|
|
114
|
+
- If all done: suggest archive with `/opsx-archive`
|
|
115
|
+
- If paused: explain why and wait for guidance
|
|
116
|
+
|
|
117
|
+
Then run `team_cleanup`.
|
|
118
|
+
|
|
119
|
+
**Guardrails**
|
|
120
|
+
- NEVER implement tasks directly — always use `team_create` + `team_spawn`
|
|
121
|
+
- Always read context files before spawning (from the apply instructions output)
|
|
122
|
+
- Always pass context file paths and task list to spawned specialists
|
|
123
|
+
- Mark tasks complete in openspec AFTER specialists finish, not before
|
|
124
|
+
- If task is ambiguous, pause and ask before spawning
|
|
125
|
+
- If implementation reveals issues, pause and suggest artifact updates
|
|
126
|
+
- Pause on errors, blockers, or unclear requirements — don't guess
|
|
127
|
+
- Use contextFiles from CLI output, don't assume specific file names
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Keep all steps before the implementation step unchanged — they are openspec's domain (select change, check status, get instructions, read context, show progress).
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
68
134
|
### Step 5, Confirm
|
|
69
135
|
|
|
70
136
|
Tell the user:
|
|
@@ -108,9 +174,9 @@ This is the agent orchestration layer for your project. It provides:
|
|
|
108
174
|
When the user provides a work item URL, says "implement the plan", or "I've added comments to the PR", **I own the full lifecycle**. I load the appropriate skill and use ensemble tools (`team_create`, `team_spawn`, etc.) to coordinate the agent team.
|
|
109
175
|
|
|
110
176
|
Trigger patterns:
|
|
111
|
-
- `work on this <azure-devops-url>` → spawn `devops-manager` in read mode → propose OpenSpec → implement → ship
|
|
112
|
-
- `work on this <github-url>` → spawn `devops-manager` in read mode → propose OpenSpec → implement → ship
|
|
113
|
-
- `implement the plan` →
|
|
177
|
+
- `work on this <azure-devops-url>` → spawn `devops-manager` in read mode → propose OpenSpec → **confirm with user** → implement → ship
|
|
178
|
+
- `work on this <github-url>` → spawn `devops-manager` in read mode → propose OpenSpec → **confirm with user** → implement → ship
|
|
179
|
+
- `implement the plan` → run `/opsx-apply` (ensemble orchestration is built into the command) → ship
|
|
114
180
|
- `I've added comments to the PR` → spawn `devops-manager` in feedback mode → fix → update PR
|
|
115
181
|
|
|
116
182
|
**Never delegate without a plan. Never write implementation code directly, always spawn specialists.**
|
|
@@ -166,21 +232,17 @@ devops-manager (ship mode)
|
|
|
166
232
|
1. team_spawn devops-manager (read mode) → fetch work item via skill, output summary
|
|
167
233
|
2. Load skill: openspec-propose → generate proposal.md, specs/, tasks.md
|
|
168
234
|
- team_create → spawn design + specs in parallel → merge → write tasks.md
|
|
169
|
-
3. Show
|
|
235
|
+
3. Show the plan: change name, schema, total tasks, task list summary
|
|
236
|
+
4. STOP. Ask user: "Ready to implement? (yes/no)" — DO NOT proceed until confirmed.
|
|
170
237
|
```
|
|
171
238
|
|
|
172
239
|
### Phase 2, Implement
|
|
173
240
|
|
|
174
241
|
```
|
|
175
|
-
1.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
5. Spawn only what the task needs (in parallel):
|
|
180
|
-
team_spawn name:front agent:front-engineer → UI tasks
|
|
181
|
-
team_spawn name:back agent:back-engineer → backend tasks
|
|
182
|
-
team_spawn name:infra agent:infra-engineer → infra tasks
|
|
183
|
-
6. Wait for all → team_results → team_shutdown + team_merge
|
|
242
|
+
1. Run /opsx-apply (or load skill openspec-apply-change)
|
|
243
|
+
The command handles context reading, ensemble orchestration, and task marking automatically.
|
|
244
|
+
DO NOT implement tasks directly — the command spawns specialists via ensemble.
|
|
245
|
+
2. After /opsx-apply completes, proceed to quality check.
|
|
184
246
|
```
|
|
185
247
|
|
|
186
248
|
### Phase 3, Quality
|
|
@@ -247,6 +309,7 @@ Skills are located in `.agents/skills/`. Each skill has a `SKILL.md` with a desc
|
|
|
247
309
|
| `openspec-propose` | Propose change artifacts (proposal, specs, tasks) |
|
|
248
310
|
| `openspec-apply-change` | Implement change with agent team |
|
|
249
311
|
| `openspec-archive-change` | Archive completed change |
|
|
312
|
+
| `browser-automation` | Browser automation for localhost UI — screenshots, clicks, queries |
|
|
250
313
|
|
|
251
314
|
---
|
|
252
315
|
|
|
@@ -276,6 +339,52 @@ Example: `feature/42-add-user-auth`
|
|
|
276
339
|
|
|
277
340
|
---
|
|
278
341
|
|
|
342
|
+
## Session Log
|
|
343
|
+
|
|
344
|
+
<!-- session-logging: enabled -->
|
|
345
|
+
|
|
346
|
+
All agents MUST log their activity to `.agents/session-log.md`. This file is gitignored and temporary.
|
|
347
|
+
|
|
348
|
+
**Check before logging:** Read the `session-logging` comment above. If it says `disabled`, skip all logging.
|
|
349
|
+
|
|
350
|
+
**On first write per session**, create the file with the header:
|
|
351
|
+
```markdown
|
|
352
|
+
# Session Log
|
|
353
|
+
|
|
354
|
+
| Timestamp | Agent | Action | Detail |
|
|
355
|
+
|-----------|-------|--------|--------|
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Log these events** by appending a row:
|
|
359
|
+
- Lead spawns an agent → `| {ISO timestamp} | lead | spawned | {agent-name} for {purpose} |`
|
|
360
|
+
- Agent starts → `| {ISO timestamp} | {agent-name} | started | {task summary} |`
|
|
361
|
+
- Agent loads a skill → `| {ISO timestamp} | {agent-name} | skill-loaded | {skill-name} |`
|
|
362
|
+
- Agent completes → `| {ISO timestamp} | {agent-name} | completed | {files changed count} files |`
|
|
363
|
+
- Agent blocked → `| {ISO timestamp} | {agent-name} | blocked | {reason} |`
|
|
364
|
+
|
|
365
|
+
**Rules:**
|
|
366
|
+
- Append only, never overwrite previous entries
|
|
367
|
+
- One row per event, keep detail column short
|
|
368
|
+
- Use ISO 8601 timestamps
|
|
369
|
+
- The file is gitignored — never commit it
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## RTK
|
|
374
|
+
|
|
375
|
+
Use `rtk` wrapper for ALL CLI commands. Never run git, az, gh, or openspec commands directly.
|
|
376
|
+
|
|
377
|
+
- `rtk git add` NOT `git add`
|
|
378
|
+
- `rtk git commit` NOT `git commit`
|
|
379
|
+
- `rtk git push` NOT `git push`
|
|
380
|
+
- `rtk az boards work-item show` NOT `az boards work-item show`
|
|
381
|
+
- `rtk az repos pr create` NOT `az repos pr create`
|
|
382
|
+
- `rtk gh issue view` NOT `gh issue view`
|
|
383
|
+
- `rtk gh pr create` NOT `gh pr create`
|
|
384
|
+
- `rtk openspec new change` NOT `openspec new change`
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
279
388
|
## Guardrails
|
|
280
389
|
|
|
281
390
|
### Git Operations
|